package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * 客户电话格式设置
 *
 * @author feng.zheng
 * @version v1.0
 * @date 2019/1/29 16:33
 * @since v1.0
 */
@Getter
public enum PhoneFormatSettingEnum {
    /**
     * 客户电话格式设置
     * 0：仅数字
     * 1：数字、字母、空格、加号、中划线、小数点、下划线及@
     * 2：11位数字
     */
    ONLY_NUMBER(0, "enum.phoneFormatSetting.alias.only_number"),
    MOST_FORMAT(1, "enum.phoneFormatSetting.alias.most_format"),
    ELEVEN_NUMBER(2, "enum.phoneFormatSetting.alias.eleven_number"),;
    private Integer code;

    private String alias;

    PhoneFormatSettingEnum(Integer code, String alias) {
        this.code = code;
        this.alias = alias;
    }

    public String getAlias() {
        return I18nMessageUtil.getMessage(alias);
    }
}
